/******************************************************************************
 * Header, page structure, basic elements
 */
html,
body {
  height: 100%;
  /* The html and body elements cannot have any padding or margin. */
}

/* Wrapper for page content to push down footer */
body > .ember-view {
  height: 100%;
}

#waiting-for-ember .alert {
  margin-top: 1em;
}

#application {
  min-height: 100%;
  height: auto !important;
  height: 100%;
  /* Negative indent footer by its height */
  margin: 0 auto -60px;
  /* Pad bottom by footer height */
  padding: 0 0 60px;
}

/* Set the fixed height of the footer here */
#footer {
  height: 60px;
  padding-top: 20px;
  background-color: #f5f5f5;
}

.header {
  margin-top: 0;
  margin-bottom: 0;
}

.toplogo {
  padding-top:6px;
  padding-right:12px;
}

.header .userinfo {
  font-size: small;
  color: #aaa;
  margin-top: 20px;
}

label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.description {
  margin-bottom: 12px;
}

.tab-close {
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: 0.2;
}

.tab-close:hover, .tab-close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.5;
}

.modal-header + .modal-body h3 {
  margin-top:5px;
}

.navbar {
  margin-bottom:10px;
}

.maincontent {
  margin-bottom:300px;
}

.container.sections {
  padding-top:20px;
}

.section {
  padding:0px !important;
}

.table-bordered tr.spacer th {
  padding-top:15px;
  background-color: #eee;
}

/* Fix pointer on bootstrap navbars */
ul.pagination li:not(.disabled) > a {
  cursor: pointer;
}

span.pagination-label {
  float: left;
  padding: 6px 0;
}

span.oxi-label {
    display: inline-block;
    white-space: nowrap;
}

/* Remove padding below UL and DL */
dl, ul {
  margin-bottom: 0;
}

/* Indent DL items */
dd {
  padding: 0 0 0 1em;
}
dd + dt {
  padding-top: 0.5em;
}

/* Pager */
.oxi-pager .pagination {
  margin: 0;
}

/* Spacer */
div.spacer {
  margin:5px;
}

/******************************************************************************
 * Loading indicators
 */

.dimmer {
  position:fixed;
  top:0;
  bottom:0;
  left:0;
  right:0;
  background-color:#eee;
  opacity:0.3;
  z-index:1001;
}

.refresh.progress, .loading.progress {
  position: fixed;
  top: 30px;
  right: 20px;
  width: 100px;
  z-index:1002;
}

.refresh.progress .progress-bar, .loading.progress .progress-bar {
  width: 100%;
}

.waiting-for-ember {
  margin-top: 80px;
}

/******************************************************************************
 * Breadcrumbs
 */
.oxi-pagehead ol.breadcrumb {
  margin:10px 0 0 0;
  padding: 0;
  background-color: transparent;
  border: none;
  border-radius: 0;
  list-style: none inside;
  color: #a0a0a0;
}

ol.breadcrumb > li + li:before {
  color: #a0a0a0;
}

.oxi-pagehead ol.breadcrumb + h2 {
  margin-top:10px;
}

ol.breadcrumb .workflow-type:before {
  padding-right: 5px;
  font-family: "Glyphicons Halflings";
  content: "\e136";
  color: #a0a0a0;
}

ol.breadcrumb .workflow-state:before {
  padding-right: 5px;
  font-family: "Glyphicons Halflings";
  content: "\e062";
  color: #a0a0a0;
}

ol.breadcrumb .workflow-search:before,
ol.breadcrumb .cert-search:before {
  padding-right: 5px;
  font-family: "Glyphicons Halflings";
  content: "\e003";
  color: #a0a0a0;
}

ol.breadcrumb .workflow-search-result:before,
ol.breadcrumb .cert-search-result:before {
  padding-right: 5px;
  font-family: "Glyphicons Halflings";
  content: "\e056";
  color: #a0a0a0;
}

/******************************************************************************
 * Grid
 */

.oxi-grid-container {
  padding-bottom:40px;
}

div.oxisection-grid th.sortable {
  cursor: pointer;
  -webkit-user-select: none;
}

tr.has-action {
  cursor: pointer;
}

/* plain grid-row without status */
tr.gridrow > td {}
tr.gridrow:hover > td {background-color: #E7E7E7 !important;}

/* certificate specific classes: issued, expired, revoked */
tr.gridrow-issued > td {}
tr.gridrow-issued:hover > td {background-color: #E7E7E7 !important;}
tr.gridrow-expired > td {background-color:#fcf8e3 !important;}
tr.gridrow-expired:hover > td {background-color: #E7E7E7 !important;}
tr.gridrow-revoked > td {background-color: #f2dede !important;}
tr.gridrow-revoked:hover > td {background-color: #e6c1c7 !important;}

/* ca certificat/token specific classes: online, offline, upcomging */
tr.gridrow-online > td {background-color:#dff0d8 !important;}
tr.gridrow-online:hover > td {background-color: #E7E7E7 !important;}
tr.gridrow-offline > td {background-color:#f2dede !important;}
tr.gridrow-offline:hover > td {background-color: #E7E7E7 !important;}
tr.gridrow-upcoming > td {background-color:#d9edf7 !important;}
tr.gridrow-upcoming:hover > td {background-color: #E7E7E7 !important;}

/* workflow specific classes: finished, exception, manual, pause, failed */
tr.gridrow-finished > td {background-color: #e8f0e4!important;}
tr.gridrow-finished:hover > td {background-color: #c9e2b3 !important;}
tr.gridrow-failed > td {background-color: #f3d3d3!important;}
tr.gridrow-failed:hover > td {background-color: #e6a1ac!important;}
tr.gridrow-manual > td { background-color: #fcfcca!important; }
tr.gridrow-manual:hover > td {background-color: #f3f330!important;}
tr.gridrow-paused > td {background-color: silver !important;}
tr.gridrow-paused:hover > td {background-color: #e7e7e7 !important;}
tr.gridrow-retry_exceeded > td {background-color: #ffc04d!important;}
tr.gridrow-retry_exceeded:hover > td {background-color: #ffe4b3!important;}
tr.gridrow-exception > td {background-color: #ffc04d!important;}
tr.gridrow-exception:hover > td {background-color: #ffe4b3!important;}

/* general classes...*/
tr.gridrow-ok > td {background-color: #dff0d8 !important;}
tr.gridrow-ok:hover > td {background-color: #c9e2b3 !important;}
tr.gridrow-warning > td {background-color: #fbeed5 !important;}
tr.gridrow-warning:hover > td {background-color: #faf2cc !important;}
tr.gridrow-danger > td {background-color: #ebcccc !important;}
tr.gridrow-danger:hover > td {background-color: #e6c1c7 !important;}

/******************************************************************************
 * Status labels inside key/value lists
 */
.styled-valid,
.dns-valid,
.certstatus-issued {
  color: green;
}

.styled-failed,
.dns-failed,
.certstatus-revoked {
  color: red;
}

.dns-skipped,
.styled-attention,
.certstatus-crl_issuance_pending {
  color: orange;
}

.certstatus-expired {
  color: #444;
}

.dns-timeout,
.certstatus-unknown {
  color: #79d1f3;
}

.styled-attention,
.styled-failed {
  font-weight: bold;
}
/* keep line wraps in code */
code { white-space: pre; }

/******************************************************************************
 * Form fields
 */

input.in-form-group {
  margin-bottom: 15px;
}

.oxi-no-input {
  padding-top: 6px;
}

/* Input fields */
div.required input,
div.required select,
div.required textarea {
  background-color:#fff3c2;
  border:1px solid #444;
}

div.required input.form-control[disabled] ,
div.required select.form-control[disabled],
div.required textarea.form-control[disabled] {
  border:1px solid #ccc;
}

div.optional label.control-label:after {
  content: '*';
}

div.optional input,
div.optional select,
div.optional textarea {
  border:1px #888 dashed;
}

.oxi-checkbox {
  position: relative;
  top: 4px;
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid;
  border-radius: 2px;
  border-color: rgba(0, 0, 0, 0.54);
}

.oxi-checkbox.checked:after {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  opacity: 0.54;
  background-color: #000;
  content: ' ';
}

/* oxifield-uploadarea */
div.oxifield-upload {
  position: relative;
  padding-bottom: 34px;
}

/* Clonable fields */

/* column holding the clonable buttons */
.clonable-btn-group {
  white-space: nowrap;
}

/******************************************************************************
 * Buttons
 */
.stacked-buttons {
  margin-top: 4px;
  margin-bottom: 4px;
}

.stacked-buttons .btn-bt-margin {
  margin-top: 6px;
  margin-bottom: 6px;
}

.oxi-btn-loading {
  color: #fff;
  background-color: #428bca;
  border-color: #357ebd;
}

.oxi-btn-loading:hover, .oxi-btn-loading:focus, .oxi-btn-loading:active, .oxi-btn-loading.active {
  color: #fff;
  background-color: #3276b1;
  border-color: #285e8e;
}

.oxi-button-container {
  padding-bottom: 20px;
}

.oxi-button-container a.btn:before {
  padding-right: 5px;
  font-family: "Glyphicons Halflings";
  content: "\e144";
  color: #a0a0a0;
}

/* Button format from workflow defs */
.oxi-btn-expected,
.oxi-btn-expected:hover,
.oxi-btn-expected:focus,
.oxi-btn-submit,
.oxi-btn-submit:hover,
.oxi-btn-submit:focus {
    background-color: #c9e2b3;
}

.oxi-btn-optional,
.oxi-btn-optional:hover,
.oxi-btn-optional:focus {
    background-color: #e4e4da;
}

.oxi-btn-failure,
.oxi-btn-failure:hover,
.oxi-btn-failure:focus,
.oxi-btn-cancel,
.oxi-btn-cancel:hover,
.oxi-btn-cancel:focus {
    background-color: #e39f9f;
}

.oxi-btn-reset,
.oxi-btn-reset:hover,
.oxi-btn-reset:focus,
.oxi-btn-alternative,
.oxi-btn-alternative:hover,
.oxi-btn-alternative:focus {
    background-color: #ffd78c;
}

.oxi-btn-exceptional,
.oxi-btn-exceptional:hover,
.oxi-btn-exceptional:focus {
    background-color: #79d1f3;
}

.oxi-btn-terminate,
.oxi-btn-terminate:hover,
.oxi-btn-terminate:focus {
    background-color: #ad7fa8;
}

/******************************************************************************
 * Others
 */
.hover-element {
  display: inline flex;
  flex-direction: column;
}

.hover-element .content {
  margin: 0 auto;
}

/* Dropdown Content (Hidden by Default) */
.hover-element .menu {
  display: none;
  background-color: #dff0d8;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 10;
  width: 100%;
  padding: 6pt;
}

/* Show the dropdown menu on hover */
.hover-element:hover .menu { display: block }

/* Change the background color of the dropdown button when the dropdown content is shown */
.hover-element:hover .content { border-color: #bfe0a8 }
